---
slug: /plugins/exit-break
title: Exit Break
---

Allows you to create hotkeys which exit the current block.

### `createExitBreakPlugin`

```ts live
() => {
  const optionsExitBreakPlugin = {
    rules: [
      {
        hotkey: 'mod+enter',
      },
      {
        hotkey: 'mod+shift+enter',
        before: true,
      },
      {
        hotkey: 'enter',
        query: {
          start: true,
          end: true,
          allow: KEYS_HEADING,
        },
      },
    ],
  };

  const plugins = [
    ...pluginsBasic,
    createListPlugin(),
    createTablePlugin(),
    createResetNodePlugin(optionsResetBlockTypePlugin),
    createSoftBreakPlugin(optionsSoftBreakPlugin),
    createExitBreakPlugin(optionsExitBreakPlugin),
    createTrailingBlockPlugin({ type: ELEMENT_PARAGRAPH }),
  ];

  return (
    <Plate
      id="exit-break"
      plugins={plugins}
      components={components}
      options={options}
      editableProps={editableProps}
      initialValue={initialValueExitBreak}
    />
  );
}
```
